<script>
import {  mapActions } from 'vuex'
export default {
  onLaunch: function () {
    console.log('App Launch')
    // this.getUserInfo()
    uni.$on('need_login', ()=> {
      this.clearUserState()
    })
  },
  onShow: function () {
    this.getSysConfig()
    this.getUserInfo({silent: true})

  },
  onHide: function () {
    console.log('App Hide')
  },
  methods: {
    ...mapActions('app', ['getSysConfig']),
    ...mapActions('user', ['clearUserState']),
    ...mapActions('user', ['getUserInfo']),
  }
}
</script>

<style lang="scss">
@import "uview-plus/index.scss";

@import '@/styles/iconfont.scss';
// @import '@/assets/font/fonts.scss';
/*每个页面公共css */

view{
  box-sizing: border-box;
}
view,text {
  font-family: Source Han Sans, Source Han Sans;
}
.flex{
  display: flex;
}
.flex-center{
  align-items: center;
  justify-content: center;
}
</style>
